from django.urls import path,re_path
from .import views
from rest_framework.routers import DefaultRouter

urlpatterns = [

    re_path('categories/(?P<category_id>\d+)/skus/', views.SKUListView.as_view()),
    # 真就奇了怪了，这里都写对了，views视图里竟然写错了
    # path('skus/search/',views.SearchViewSKU.as_view()),
]
router =  DefaultRouter()
router.register('skus/search',views.SearchViewSKU,basename='sku_search')
urlpatterns += router.urls